<%@ page import="java.util.*" %>
<%@ page import = "student.StudentsClass" %>
<jsp:useBean id="student" class="student.StudentsClass" scope="session"/>
<jsp:setProperty name="student" property="*"/>
<html>
<head>
<title>Students Database-Add Student</title>
</head>
<body bgcolor="#CCCCFF">
<%
if (student.getFlag()==0)
{
	student.setFlag(1);
	out.print("<form method=\"POST\">");
	out.println("Name: <input type=\"text\" name=\"name\"></br>");
	out.println("Location: <input type=\"text\" name=\"address\"></br>");
	out.println("Phone number: <input type=\"text\" name=\"phone\"></br>");
	out.println("<input type=\"submit\" value=\"save\">");
	out.println("</form>");
}
else if(student.getFlag()==1) 
{ 
	student.addItem();
	out.print("New record has been added. Return to <a href=\"StudentDatabase.jsp\">home</a>?");
}
	%>
